<?php


namespace App\Http\Controllers\Api;


use App\Http\Controllers\ApiController;
use App\Service\QiNiuService;
use Illuminate\Http\Request;

class UploadController extends ApiController
{

    public function upload(Request $request)
    {
        $img = $request->file('img');
        $qiniu = new QiNiuService();
        $url = $qiniu->imageFileArray($img, $request);
        return $this->makeResponse(['url' => $url], '上传成功', 200);
    }
}